
from sanic import Request

from app.utils.JwtUtils import JwtUtils

class BaseController:
    request:Request=None
    header=None
    user=None

    def __init__(self) -> None:
        self.request=Request.get_current()
        token=self.request.headers.get("x-token")
        try:
            self.user=JwtUtils.decodeToken(token)
        except Exception as e:
            pass
    